<template>
  <el-card class="common-card">
    <div class="card-title">{{ title }}</div>
    <div class="card-value">{{ value }}</div>
    <div class="card-chart">
      <slot name="default"></slot>
    </div>
    <div class="card-line"></div>
    <div class="card-footer">
      <slot name="footer"></slot>
    </div>
  </el-card>
</template>

<script lang="ts">
export default {
  name: 'CommonCard',
  props: ['title', 'value'],
}
</script>
<script lang="ts" setup></script>

<style lang="scss" scoped>
.common-card {
  .card-title {
    font-size: 12px;
    color: #999;
  }
  .card-value {
    letter-spacing: 1px;
    margin:5px 0;
    font-size: 25px;
    color: #303133;
  }
  .card-chart {
    height:50px;
    color: #666;
    font-size: 12px;
    font-weight: 600;
  }
  .card-line {
    border: 1px #eee solid;
    margin: 10px 0;
  }
  .card-footer {
    color: #666;
    font-size: 12px;
  }
}
</style>
